<?php
session_cache_expire(999999999);
if(!isset($_SESSION)) 
	{ 
		session_start(); 
	}
function getlang(){
		
		if(isset($_SESSION['lang']))
		$lang=$_SESSION['lang'];
		if (empty($lang) || $lang == "EN") {
			$value = "../value/value_en.php";
		} else if($lang == "VN") {
			$value = "../value/value_vn.php";
		}
		else {
			$value = "../value/value_kr.php";
		}
		return $value;
	}
$value = getlang();
include($value);
$listpayment =$_SESSION['listpayment'];

#echo $_GET['action'];
if (isset($_GET['action'])){
	if($_GET['action']=='add'){

		$listpayment[]=array("","",0,"");
		
	}

}
?>

		<table class="tcontent" cellpadding="5" cellspacing="0" id="tblView">
			<tr class="trtit">
				<td width="5%"></td>
				<td width="15%"><?php echo $l_items?>(*)</td>
				<td width="50%"><?php echo $l_content?></td>
				<td width="15%"><?php echo $l_currency?></td>
				<td width="15%"><?php echo $l_remarks?></td>
			</tr>
			<?php 
				$i=1;
				$total=0;
				foreach ($listpayment as $payment){?>
				<tr id="my_row">
				<td><?=$i?></td>
				<td><input type="text" onkeypress="return enterTable(event,this.id,<?php echo count($listpayment);?>,'0')" id="<?echo "namea".$i?>" name="item[]" onchange="chItemProduct(this.value,<?=$i?>)" onkeyup="chItemProduct(this.value,<?=$i?>)" style="height: 24px; width: 96%; border: 1px solid #c4c0c9" value="<?=$payment[0]?>" /></td>
				<td><input type="text" onkeypress="return enterTable(event,this.id,<?php echo count($listpayment);?>,'0')" id="<?echo "nameb".$i?>" name="contentitem[]" onchange="chContentProduct(this.value,<?=$i?>)"  onkeyup="chContentProduct(this.value,<?=$i?>)"	style="height: 24px; width: 96%; border: 1px solid #c4c0c9" value="<?=$payment[1]?>" /></td>
				<td><input type="text" onkeypress="return enterTable(event,this.id,<?php echo count($listpayment);?>,'1')" id="<?echo "namec".$i?>" name="currency[]" onchange="chCurencyProduct(this.value,<?=$i?>)"  onkeyup="chCurencyProduct(this.value,<?=$i?>)" style="height: 24px; width: 96%; border: 1px solid #c4c0c9" value="<?=$payment[2]?>" autocomplete="off"  /></td>
				<td><input type="text" onkeypress="return enterTable(event,this.id,<?php echo count($listpayment);?>,'0')" id="<?echo "named".$i?>" name="remark[]" onchange="chRemarksProduct(this.value,<?=$i?>)"  onkeyup="chRemarksProduct(this.value,<?=$i?>)" style="height: 24px; width: 96%; border: 1px solid #c4c0c9" value="<?=$payment[3]?>" /></td>
				</tr>
				<?php 
				$i=$i+1;
				}
				?>
		</table>
<?php $_SESSION['listpayment']=$listpayment;?>
